﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserCtrol_UserStatus : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["AdminId"] != null || Session["CustomerId"] != null)
        {
            if (Session["AdminId"] != null)//管理员
            {
                lblWelcome.Text = "您好，" + Session["AdminName"].ToString();
                MyManageWork.Visible = true;
            }
            else if (Session["CustomerId"] != null)//一般用户
            {
                lblWelcome.Text = "您好，" + Session["CustomerName"].ToString();
                InkbtnPwd.Visible = true;
            }
            InkbtnLogout.Visible = true;
            MyWork.Visible = true;
        }
    }
    protected void InkbtnLogout_Click(object sender, EventArgs e)
    {
        Session.Clear();
        Response.Redirect("~/Login.aspx");
    }
}